<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ page isELIgnored="false"%>
<%@page import="com.tueye.utils.DateUtils"%>
<%@page import="com.tueye.utils.TuEyeConstant"%>
<%@page import="com.tueye.entity.Admin"%>
<%
	String path = request.getContextPath();
	String usrename = (((Admin)request.getSession().getAttribute(TuEyeConstant.TUEYE_ADMIN)).getUsername());
 %>
<html>
	<head>
		<title>tueye后台管理－tueye系统管理－tueye专业的图片欣赏交流社区</title>
		<meta http-equiv="pragma" content="no-cache">
		<meta http-equiv="cache-control" content="no-cache">

		<link rel="stylesheet" type="text/css"
			href="<%=path %>/themes/css/ext-all.css" />
		<link rel="stylesheet" type="text/css" href="<%=path %>/themes/css/common.css" />

		<script type="text/javascript" src="<%=path %>/script/ext/ext-base.js"></script>
		<script type="text/javascript" src="<%=path %>/script/ext/ext-all.js"></script>
		

		<style type="text/css">
			
			.x-panel-body p {
				margin: 5px;
			}
			
			.x-column-layout-ct .x-panel {
				margin-bottom: 5px;
			}
			
			.x-column-layout-ct .x-panel-dd-spacer {
				margin-bottom: 5px;
			}
			
				
			.user {
				background-image: url(<%=path%>/themes/icons/user.gif) !important;
			}	
			.unit {
				background-image: url(<%=path%>/themes/icons/application_view_list.png) !important;
				  
			}
			
			.settings {
				background-image: url(<%=path%>/themes/icons/cog.png) !important;
			}
			.tabs {
			    background-image:url(<%=path%>/themes/icons/tabs.gif ) !important;
			}
			.munuList{
				list-style-image:url(<%=path%>/themes/icons/rss_go.png);
				padding-left:30px;
				margin-top:10px;
				color: #000000;
				font-size:12px;
				text-decoration : underline; 
				cursor:hand;
			}	
			
			#main-panel td {
           		padding:5px;
        	}
		</style>

	</head>
	<body>
		<script type="text/javascript">
			
       		//create main tabpanel
       		var tabPanel=new Ext.TabPanel({
            	id:"tabPanel",
                   region:'center',
                   deferredRender:false,
                   activeTab:0,
                   iconCls: 'tabs',
                   items:[{
                       contentEl:'center',
                       title: '首页',
                       autoScroll:true
                   }]
          	});
	    	Ext.onReady(function(){
		       Ext.state.Manager.setProvider(new Ext.state.CookieProvider());
		       
		       
		       //init main page framework
		       var viewport = new Ext.Viewport({
		            layout:'border',
		            items:[{
				        region: 'north',
				        html: '<div class="layout-title">TuEye<span>- 版权：TUEYE编译室  版本号: v0.5---登录用户：<%=usrename%></span></div>',
				        autoHeight: true,
				        border: false,
				        layout:"absolute",
				        margins: '5 5 5 10'
				    },{
		                region:'west',
		                id:'west-panel',
		                title:'菜单栏',
		                split:true,
		                width: 200,
		                minSize: 175,
		                maxSize: 400,
		                collapsible: true,
		                margins:'0 0 5 5',
		                cmargins:'0 5 5 5',
		                layout:'accordion',
		                layoutConfig:{
		                    animate:true
		                },
		                items: [{
		                    title:'主题管理',
		                    html: Ext.getDom('unitMenus').innerHTML,
		                    border:false,
		                    autoScroll:true,
		                    iconCls:'unit'
		                },{
		                    title:'系统管理',
		                    html: Ext.getDom('userMenus').innerHTML,
		                    autoScroll:true,
		                    border:false,
		                    iconCls:'user'
		                },{
		                    title:'系统设置',
		                    html: Ext.getDom('settingMenus').innerHTML,
		                    border:false,
		                    autoScroll:true,
		                    iconCls:'settings'
		                }]
		            },tabPanel]
		        });
		        
		        //init main page tables
		        var panel = new Ext.Panel({
	                id:'main-panel',
	                baseCls:'x-plain',
	                renderTo: Ext.get("center"),
	                layout:'table',
	                layoutConfig: {columns:2},
	                defaults: {frame:true, width:800, height: 600},
	                items:[{
	                    title:'公告信息',
	                    colspan:2,
	                    collapsible:true,
	                    width:800,
	                    contentEl:'afficheDiv'
	                }]
	            });
		        //clear temp elements.
		       	Ext.getDom("menus").innerHTML="";
		    });
		    
		    function onClickMenuItem(el){ 
		    	updateTab(el.id,el.innerHTML,el.href);
		    }
		    
		    function addTab(id,tabTitle, targetUrl){
		        tabPanel.add({
		        	id:id,
				    title: tabTitle,
				    iconCls: 'tabs',
				    autoLoad: {url: "<%=path%>/pages/admin/tabFrame.jsp?url="+targetUrl, callback: this.initSearch, scope: this},
				    closable:true
				}).show();
		    }
		    
		    function updateTab(id,title, url) {
		    	var tab = tabPanel.getItem(id);
		    	if(tab){
		    		tabPanel.remove(tab);
		    	}
		    	tab = addTab(id,title,url);
		    	tabPanel.setActiveTab(tab);
		    }
		       
		</script>

		<div id="menus">
			<!-- html part -->
			<div id="unitMenus">
				<ul class="munuList">
					<li>
					<!-- 
						<span id="unit" href="<%=path %>/pages/admin/topicmanager/topicmanager.jsp" onclick="onClickMenuItem(this)">正常发布</span>
					 -->
					 <span id="unit" href="<%=path %>/pages/admin/global/global_grid_list.jsp" onclick="onClickMenuItem(this)">正常发布</span>
					</li>
					<li>
						<span id="unit" href="<%=path %>/pages/admin/topicmanager/topicnearfuture.jsp" onclick="onClickMenuItem(this)">近期推荐</span>
					</li>
					<li>
						<span id="unit" href="<%=path %>/pages/admin/keyword/keywordinfo.jsp" onclick="onClickMenuItem(this)">关键字</span>
					</li>
					<li>
						<span id="unit" href="<%=path %>/pages/admin/topicmanager/createindex.jsp" onclick="onClickMenuItem(this)">生成首页</span>
					</li>
					<li>
						<span id="unit" href="<%=path %>/pages/admin/article/article.jsp" onclick="onClickMenuItem(this)">专题管理</span>
					</li>
					<li>
						<span id="unit" href="<%=path %>/pages/admin/topictype.jsp" onclick="onClickMenuItem(this)">文章类型管理</span>
					</li>
				</ul>
			</div>
			<div id="userMenus">
				<ul class="munuList"> 
					<li>
						<span id="person" href="<%=path %>/pages/admin/userinfo.jsp" onclick="onClickMenuItem(this)">用户管理</span>
					</li>
					<li>
						<span id="person" href="<%=path %>/pages/admin/usermanager/usermanager.jsp" onclick="onClickMenuItem(this)">会员管理</span>
					</li>
				</ul>
			</div>
			<img border="0"/>
			<div id="settingMenus">
				<ul class="munuList">
					<li>
						<span id="userManager" href="<%=path %>/pages/admin/ad/adsite.jsp" onclick="onClickMenuItem(this)">广告管理</span>
					</li>
					<li>
						<span id="userManager" href="<%=path %>/pages/admin/sysdic/sysdic.jsp" onclick="onClickMenuItem(this)">模板系统字典</span>
					</li>
				</ul>
			</div>
		</div>
		
		<div id="center">
	        
	  	</div>
	  	
	  	<div id="afficheDiv">
	  	<%-- <%=DateUtilsPlus.getDate("yyyy-MM-dd HH:mm")%>
	  	<%=((User)request.getSession().getAttribute("user")).getUserName()%>
	  	--%>
	  		<p>当前日期：<%=DateUtils.getCurFormatDate("yyyy-MM-dd HH:mm") %></p>
	  		<p>尊敬的 <font color=green><B>  	<%=usrename%> </B></font> 用户,欢迎您登录TuEye管理系统.</p>
	        <p>您可以点击<a href="">退出</a>,退出登录． </p>
	        <p>您可以管理所有的作品，作品的图片，留言等 </p>
	        <p>您可以管理广告位置，广告位置下所有信息等</p>
	        <p>您可以管理系统所有用户。。。</p>
	  	</div>
	 
	</body>
</html>
